package com.sen.pro.switches.core.entity;

import org.apache.commons.lang.StringUtils;

/**
 * 站点地址实体类
 * 
 * @author tian qingsen
 */
public class SiteLinks {

	private static final String DEFAULT_LINKTARGET = "_blank";

	private Integer linkId;
	private String linkName;
	private String linkUrl;
	private String linkTarget;
	private String linkParams;
	private Integer sortNum;

	public Integer getLinkId() {
		return linkId;
	}

	public void setLinkId(Integer linkId) {
		this.linkId = linkId;
	}

	public String getLinkName() {
		return linkName;
	}

	public void setLinkName(String linkName) {
		this.linkName = linkName;
	}

	public String getLinkUrl() {
		return linkUrl;
	}

	public void setLinkUrl(String linkUrl) {
		this.linkUrl = linkUrl;
	}

	public String getLinkTarget() {
		return linkTarget;
	}

	public void setLinkTarget(String linkTarget) {
		this.linkTarget = linkTarget;
	}

	public String getLinkParams() {
		return linkParams;
	}

	public void setLinkParams(String linkParams) {
		this.linkParams = linkParams;
	}

	public Integer getSortNum() {
		return sortNum;
	}

	public void setSortNum(Integer sortNum) {
		this.sortNum = sortNum;
	}

	public void initDefaultVal() {
		if (sortNum == null) {
			sortNum = 0;
		}
		if (StringUtils.isBlank(linkTarget)) {
			linkTarget = DEFAULT_LINKTARGET;
		}
	}
}
